package cn.fintecher.pangolin.entity.mysql;

import cn.fintecher.pangolin.common.enums.FlowType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;
import java.util.Set;

/**
 * @Author wangxiangdong
 * @Description  审批流程设置
 * @Date 2019/9/18 19:01
 **/
@Data
@Entity
@Table(name = "flow_configuration")
@ApiModel(value = "流程设置实体", description = "流程设置实体")
public class FlowConfiguration extends BaseEntity{

    @ApiModelProperty(notes = "配置名称")
    private String configName;

    @ApiModelProperty(notes = "申请类型")
    @Enumerated(EnumType.STRING)
    private FlowType flowType;

    @ApiModelProperty(notes = "操作人信息")
    private String operator;

    @ApiModelProperty(notes = "操作时间")
    private Date operatorTime;

    @ApiModelProperty(value = "审批节点")
    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    @JoinColumn(name = "flow_config_id")
    private Set<FlowNodeConfig> flowNode;

}
